<?php
	$form	= $this->form;
	$form->prepare();
	$form->setAttribute('action', $this->url('admin', array('action' => 'addsubject')));

	$labelName	= $this->formLabel($form->get('name'));
	$name	= $this->formText($form->get('name'));
	$errorName	= $this->formElementErrors($form->get('name'));

	$labelDescription	= $this->formLabel($form->get('description'));
	$description	= $this->formTextarea($form->get('description'));
	$errorDescription	= $this->formElementErrors($form->get('description'));

	$labelTime	= $this->formLabel($form->get('time'));
	$time	= $this->formSelect($form->get('time'));

	$labelNum	= $this->formLabel($form->get('num'));
	$num	= $this->formSelect($form->get('num'));

	$submit 	= $this->formInput($form->get('submit'));
	echo $this->form()->openTag($this->form);
?>
	<h2 class="sub-header" style="font-weight: bold;">Thêm môn học</h2>
	<div class="form-group">
		<h4><?php echo $labelName;?></h4>
		<div class="text-danger">
			<?php echo $errorName;?>
			<?php if ($this->err != "") echo "<ul><li>".$this->err."</li></ul>";?>
		</div>
		<?php echo $name;?>
	</div>
	<div class="form-group">
		<h4><?php echo $labelDescription;?></h4>
		<div class="text-danger"><?php echo $errorDescription;?></div>
		<?php echo $description;?>
	</div>
	<div class="form-group">
		<h4><?php echo $labelTime;?></h4>
		<?php echo $time;?>
	</div>
	<div class="form-group">
		<h4><?php echo $labelNum;?></h4>
		<?php echo $num;?>
	</div>
	<br>
	<?php echo $this->formHidden($form->get('csrf'));?>
	<p align="center"><?php echo $submit?></p>

<?php
	echo $this->form()->openTag($this->form);
?>
